﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jzy;

namespace ECommerce.Model.Advertisement
{
    public partial class AdvertisementInfo : EntityBase
    {
        private const string TABLE_NAME = "Advertisement";
        private const string INSERT_SQL = "insert into Advertisement ( [ID], [Name], [Description], [SmallImage], [BigImage], [Href]) values ( @ID, @Name, @Description, @SmallImage, @BigImage, @Href)";
        private const string UPDATE_SQL = "update Advertisement set  [ID] = @ID, [Name] = @Name, [Description] = @Description, [SmallImage] = @SmallImage, [BigImage] = @BigImage, [Href] = @Href where ID = @ID";
        /// <summary>
        /// 编号
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Description
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String SmallImage
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String BigImage
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Href
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "description":
                    this.Description = (String)value;
                    break;
                case "smallimage":
                    this.SmallImage = (String)value;
                    break;
                case "bigimage":
                    this.BigImage = (String)value;
                    break;
                case "href":
                    this.Href = (String)value;
                    break;
            }
        }
    }


}
